import Vue from 'vue'
import App from './App.vue'
import store from './store'
import router from './router'
import 'amfe-flexible'
//引入登录表单
import { Form } from 'vant'
import { Field } from 'vant'
// 这里先直接导入所有的组件
import Vant from 'vant'
//优惠券组件
import { CouponCell, CouponList } from 'vant'
// 地址栏编辑
import { ContactEdit } from 'vant'
//单选框组件引入
import { RadioGroup, Radio } from 'vant'
//引入购物车
import { SwipeCell } from 'vant'

// 引入List组件
import { List } from 'vant'

Vue.use(List)

import { Lazyload } from 'vant'
Vue.use(Lazyload)
//引入地址栏
import { AddressList } from 'vant'
Vue.use(AddressList)

Vue.use(Radio)
Vue.use(RadioGroup)
import 'vant/lib/index.css'
Vue.use(Vant)
// 弹出层插件
import { Popup } from 'vant'
Vue.use(Popup)
// 引入值得买瀑布流插件
import waterfall from 'vue-waterfall2'
Vue.use(waterfall)

import { Toast } from 'vant'

Vue.use(Toast)

// 登录表单插件
Vue.use(Form)
Vue.use(Field)

Vue.use(CouponCell)
Vue.use(CouponList)
Vue.use(ContactEdit)
Vue.use(SwipeCell)


Vue.config.productionTip = false

// 引入公共header 组件
import topHeader from './components/topHeader'
Vue.component('topHeader',topHeader)
// 注册商品列表公共组件
import productList from './components/productList'
Vue.component('productList',productList)
//引入登录页面和购物车页面头部公共组件
import headJump from  './components/headjump'
Vue.component('headJump',headJump)


new Vue({
  // 添加事件总线
  beforeCreate() {
    Vue.prototype.$bus = this
  },
  render: h => h(App),
  store,
  router
}).$mount('#app')
